//
//  BaseTableViewCell.swift
//  新闻
//
//  Created by 芮京 on 2018/12/11.
//  Copyright © 2018 芮京. All rights reserved.
//

import UIKit

class BaseTableViewCell: UITableViewCell {

    @IBOutlet weak var img: UIImageView!
    @IBOutlet weak var Zlabel: UILabel!
    @IBOutlet weak var Flabel: UILabel!
    @IBOutlet weak var Tlabel: UILabel!
    //方法
    func setCellWithData(model:Model) -> Void {
        
        let name = model.dicc
        
        let StrImagV = name!["imgsrc"] as! String
        
        if StrImagV != "" {
            let urlStr = NSURL(string:StrImagV as! String)
            let Data = NSData(contentsOf: urlStr! as URL)
            self.img.image = UIImage(data: Data! as Data )
            
            self.Zlabel.text = (name!["title"] as! String)
            self.Flabel.text = (name!["digest"] as! String)
            let SameString3 = (name!["replyCount"] as! NSNumber)
            self.Tlabel.text = SameString3.stringValue
        }
    }
}
